import React, { Component } from 'react'
import Context from '../../utils/context'
export default class Alert2 extends Component {
    state = { typeIndex: 0 }
    static contextType = Context;
    render() {
        // let {con: { type1, type2 }}=this.context.context;
        let { setN, closeAlert1 } = this.context
        return (
            <div className='alert1'>
                <div className='con'>
                    <h1 onClick={closeAlert1}>关闭</h1>
                    {/* <Banner list={list} />
            <h2>{name}</h2> */}
                    <div><button onClick={this.addCar}>加入购物车</button>:{this.state.n}</div>
                    {/* {isShow1 ? <Context.Provider value={{...this}}><Alert1/></Context.Provider> : null} */}
                </div>

            </div>
        )

    }

}
